<!--<?php
include_once PrintEot('m_header');
print <<<EOT
-->
<div class="infobox pr cc">
    <div class="p10">
<table border="0" class="vt" cellpadding="0" cellspacing="0">
		<tr>
			<td width="65"><a href="{$basename}q=user&u=$u"><img src="$faceimg" class="portrait-m"/></a></td>
			<td>
				<p class="pd8">
					<span class="b f14 pdr">{$username}</span>
					<a href="{$basename}q=user&u=$u">返回首页</a>
				</p>
				<div class="tabA" style="position:absolute;bottom:-1px;padding-left:0;width:600px;">
					<ul>
<!--
EOT;
if($u==$winduid){
print <<<EOT
-->
                        <li id="see_friend"><a href="{$basename}q=article&see=friend">好友最新帖子</a></li>
                        <li id="see_my"><a href="{$basename}q=article">我的主题</a></li>
						<li id="see_post"><a href="{$basename}q=article&see=post">我的回复</a></li>
                        <li id="see_favor"><a href="{$basename}q=article&see=favor">我的收藏</a></li>
                        <li id="see_trade"><a href="{$basename}q=article&see=trade">我的商品</a></li>
                        <li id="see_all"><a href="{$basename}q=article&see=all">论坛最新贴</a></li>
<script language="JavaScript">
setCurrent('see_$see','see_my','current');
</script>
<!--
EOT;
}else{
$friendHeaderGuide = creatFriendsHeader($u);
print <<<EOT
-->
	$friendHeaderGuide
<!--
EOT;
}print <<<EOT
-->
					 </ul>
                </div>
            </td>
		</tr>
	</table>
    </div>
</div>
<div class="wrapB cc mt8">
<div class="c"></div>
<div class="contentB cc fl">
	<div class="table-list2">
<!--
EOT;
if ($isU && $see == 'favor') {print <<<EOT
-->
				<form method="post" action="{$basename}q=article&see=favor&">
				<input type="hidden" name="verify" value="$verifyhash" />
<!--
EOT;
}
if ($see != 'trade') {
print <<<EOT
-->
    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!--
EOT;
if (empty($see)) {print<<<EOT
-->
		<tr>
			<td colspan="3"><span class="fr">排序：<a href="mode.php?m=o&q=article&ordertype=postdate&u=$u">发表时间</a>&nbsp;<a href="mode.php?m=o&q=article&ordertype=lastpost&u=$u">回复时间</a></span></td>
		</tr>

<!--
EOT;
}
if (!empty($article)) {
foreach ($article as $key => $value) {print <<<EOT
-->
			<tr>
				<td>
<!--
EOT;
if ($see == 'post') {print <<<EOT
-->
					<a href="job.php?action=topost&tid=$value[tid]&pid=$value[pid]" target="_blank">$value[subject]</a>		
<!--
EOT;
} else {print <<<EOT
-->
					<a href="read.php?tid=$value[tid]" target="_blank">$value[subject]</a>
<!--
EOT;
}print <<<EOT
-->
					<span class="f10">$value[postdate]</span><br />
					<a href="thread.php?fid=$value[fid]" target="_blank" class="gray">$value[forum]</a>
				</td>
				<td><a href="{$basename}q=user&u=$value[authorid]">$value[author]</a></td>
				<td>$value[replies]/$value[hits]</td>
<!--
EOT;
if($isU && $see=='favor'){print <<<EOT
-->
				<td><input type="checkbox" name="selid[]" value="$value[tid]" /></td>
<!--
EOT;
}print <<<EOT
-->
			</tr>
<!--
EOT;
}} else {print <<<EOT
-->
			<tr>
				<td>没有主题</td>
			</tr>
<!--
EOT;
}print <<<EOT
-->
		</table>
		$pages
<!--
EOT;
}
if ($isU && $see=='favor') {print <<<EOT
-->
				<center style="margin-top:1em">
					<input type="radio" name="job" value="change" checked />&nbsp;目录转换
					<select name="type"><option value="0"></option>
<!--
EOT;
foreach ($typeid as $key => $value) {
$k = $key + 1;
print <<<EOT
-->
						<option value="$k">$value</option>
<!--
EOT;
}print <<<EOT
-->
					</select>&nbsp;<input type="radio" name="job" value="clear" />&nbsp;删除
					<div style="margin-top:1em">
						<input class="bt" type="button" name="chkall" value="全 选" onclick="CheckAll(this.form)" /> <input class="btn" type="submit" value="提 交" />
					</div>
				</center>
		</form>
<!--
EOT;
}print <<<EOT
-->
	</div>
</div>
<!--
EOT;
if ($see=='post') {
print <<<EOT
-->
<div class="sidebarB1 cc">
	<h4 class="h5A">
        <span class="b">选择表</span>
    </h4>
	 <div class="list-F list-fen">
        <table class="u-table" width="100%" cellpadding="0" cellspacing="0" border="0">
			$p_table
		</table>
		<script language="javascript">setCurrent('up_post$ptable','up_post','current');</script>
    </div>
</div>
<!--
EOT;
}elseif($see=='favor'){print <<<EOT
-->
<div class="sidebarB1 cc">
	<h4 class="h5A">
        <span class="b">收藏分类</span>
    </h4>
    <div class="list-F list-fen">
		<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td id="uf_all"><a href="{$basename}q=article&see=favor&u=$u&type=0">默认分类</a></td>
		</tr>

<!--
EOT;
foreach ($typeid as $key => $value) {
$k = $key + 1;
print <<<EOT
-->
		<tr>
			
<!--
EOT;
if($isU){print <<<EOT
-->
			<td id="uf_$k" onmouseover="getObj('del_$k').style.display='';" onmouseout="getObj('del_$k').style.display='none';">
				<a href="{$basename}q=article&see=favor&job=deltype&type=$k&verify=$verifyhash" class="fr gray" style="padding-right:8px;display:none;" id="del_$k"  onclick="return Checkinfo();" title="删除目录">删除</a>
<!--
EOT;
}else{print <<<EOT
-->
			<td id="uf_$k">
<!--
EOT;
}print<<<EOT
-->
				<a href="{$basename}q=article&see=favor&u=$u&type=$k">$value</a>
			</td>
		</tr>
<!--
EOT;
}print <<<EOT
-->

<!--
EOT;
if ($isU) {print <<<EOT
-->
		<tr>
			<td>
				<form method="post" name="form" action="{$basename}&q=article&see=favor&">
				<input type="hidden" name="verify" value="$verifyhash" />
				<input type="hidden" name="job" value="addtype" />
				<h4 class="h5A mt8"><span class="b">添加收藏分类</span></h4>
				<div style="padding:.5em 0">名称 <input class="input" type="text" name="type" size="6" /> <input class="btn" type="submit" value="提 交" /></div>
				</form>
			</td>
		</tr>
<!--
EOT;
}print <<<EOT
-->
					</table>
					<script language="javascript">setCurrent('uf_$type','','current');</script>
</div>
<script language="JavaScript">
var ifcheck = true;
function CheckAll(form){
	for(var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if(e.type=='checkbox') e.checked = ifcheck;
	}
	ifcheck = ifcheck == true ? false : true;
}
function Checkinfo() {
	if (confirm('确定要删除该分类吗?')) {
		return true;
	} else {
		return false;
	}
}
</script>
</div>
<!--
EOT;
} elseif ($see == 'trade') {print <<<EOT
-->
<div class="c"></div>
<div class="contentB cc fl">
<!--
EOT;
if (empty($job)) {print <<<EOT
-->
		<table class="u-table" width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr class="tr2">
				<td width="12%">商品图片</td>
				<td>商品名称</td>
				<td width="13%">价格</td>
				<td width="15%">卖家</td>
				<td width="18%">交易状态</td>
			</tr>
<!--
EOT;
foreach ($trade as $key => $value) {print <<<EOT
-->
			<tr class="tr3">
				<td><img src="$value[icon]" width="40" height="40" /></td>
				<td><a href="read.php?tid=$value[tid]">$value[subject]</a></td>
				<td>$value[price]</td>
				<td><a href="mode.php?m=o&q=user&u=$value[seller]">$value[username]</a></td>
				<td>
<!--
EOT;
if ($value['ifpay'] == 4) {print <<<EOT
-->
				交易失败
<!--
EOT;
} elseif ($value['ifpay'] == 3) {print <<<EOT
-->
				交易完成
<!--
EOT;
} elseif ($value['ifpay'] == 2) {print <<<EOT
-->
				卖家已发货，<br />确认收货
<!--
EOT;
} elseif ($value['ifpay'] == 1) {print <<<EOT
-->
				买家已付款，<br />等待卖家发货
<!--
EOT;
} elseif ($value['ifpay'] == 0) {print <<<EOT
-->
				等待买家付款<br />
<!--
EOT;
}print <<<EOT
-->
					<div><a style="color:blue;" href="trade.php?action=order&oid=$value[oid]">详情</a></div>
				</td>
			</tr>
<!--
EOT;
}print <<<EOT
-->
		</table>
		$pages
<!--
EOT;
} elseif ($job == 'onsale') {print <<<EOT
-->
		<table class="u-table" width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr class="tr2">
				<td width="12%">商品图片</td>
				<td>商品名称</td>
				<td width="13%">价格</td>
				<td width="12%">商品数量</td>
				<td width="12%">出售数量</td>
			</tr>
<!--
EOT;
foreach ($trade as $key => $value) {print <<<EOT
-->
			<tr class="tr3">
				<td><img src="$value[icon]" width="40" height="40" /></td>
				<td><a href="read.php?tid=$value[tid]">$value[name]</a></td>
				<td>$value[price]</td>
				<td>$value[num]</td>
				<td>$value[salenum]</td>
			</tr>
<!--
EOT;
}print <<<EOT
-->
		</table>
		$pages
<!--
EOT;
} elseif ($job == 'saled'){print <<<EOT
-->
		<table class="u-table" width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr class="tr2">
				<td width="12%">商品图片</td>
				<td>商品名称</td>
				<td width="13%">价格</td>
				<td width="15%">买家</td>
				<td width="18%">交易状态</td>
			</tr>
<!--
EOT;
foreach ($trade as $key => $value) {print <<<EOT
-->
			<tr class="tr3">
				<td><img src="$value[icon]" width="40" height="40" /></td>
				<td><a href="read.php?tid=$value[tid]">$value[subject]</a></td>
				<td>$value[price]</td>
				<td><a href="mode.php?m=o&q=user&u=$value[buyer]">$value[username]</a></td>
				<td>
<!--
EOT;
if ($value['ifpay'] == 4) {print <<<EOT
-->
				交易失败
<!--
EOT;
} elseif ($value['ifpay'] == 3) {print <<<EOT
-->
				交易完成
<!--
EOT;
} elseif ($value['ifpay'] == 2) {print <<<EOT
-->
				卖家已发货，<br />确认收货
<!--
EOT;
} elseif ($value['ifpay'] == 1) {print <<<EOT
-->
				买家已付款，<br />等待卖家发货
<!--
EOT;
} elseif ($value['ifpay'] == 0) {print <<<EOT
-->
				等待买家付款
<!--
EOT;
}print <<<EOT
-->
					<div><a style="color:blue;" href="trade.php?action=order&oid=$value[oid]">详情</a></div>
				</td>
			</tr>
<!--
EOT;
}print <<<EOT
-->
		</table>
		$pages
<!--
EOT;
}print <<<EOT
-->
</div>
<div class="sidebarB1 cc">
	<h4 class="h5A">
        <span class="b">商品</span>
    </h4>
   <div class="list-F list-fen">
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td id="uf_onsale"><a href="{$basename}q=article&see=trade&u=$u&job=onsale">出售中的商品</a></td>
				</tr>
<!--
EOT;
if ($isU) {print <<<EOT
-->
				<tr>
					<td id="uf_buy"><a href="{$basename}q=article&see=trade&u=$u">已买入的商品</a></td>
				</tr>
				<tr>
					<td id="uf_saled"><a href="{$basename}q=article&see=trade&u=$u&job=saled">已卖出的商品</a></td>
				</tr>
<!--
EOT;
}print <<<EOT
-->
			</table>
			</div>
		<script language="javascript">setCurrent('uf_$job','uf_buy','current');</script>
</div>


	
<!--
EOT;
}print <<<EOT
-->
</div>
</div>
<!--
EOT;
?>-->
